﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frmGestionarReserva.aspx.cs" Inherits="Eventos_GestionarReserva" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.dynDateTime.min.js" type="text/javascript"></script>
<script src="Scripts/calendar-en.min.js" type="text/javascript"></script>
<link href="css/calendar-blue.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">

    $(document).ready(function () {
        $("#<%=txtFechaRealizacion.ClientID %>").dynDateTime({
            showsTime: false,
            ifFormat: "%d/%m/%Y",
            daFormat: "%l;%M %p, %e %m, %Y",
            align: "BR",
            electric: false,
            singleClick: true,
            displayArea: ".siblings('.dtcDisplayArea')",
            button: ".next()"
        });
    });

    function validarNroDoc() 
    {
        var tipoDocumento = document.getElementById("selectTipoDocumento").value;
        var numeroDocumento = document.getElementById("txtNumeroDocumento").value;
        if (tipoDocumento.toString() == "C.E.") {
            if (numeroDocumento.length < 10) 
            {
                alert("Para el tipo de Documento C.E. el numero de documento debe tener como mínimo 9 caractéres."); 
            }
        }
        else if (tipoDocumento.toString() == "D.N.I.")
        {
            if (numeroDocumento.length > 8) {
                alert("Para el tipo de Documento D.N.I. el numero de documento debe tener como máximo 8 caractéres.");
            }
        }
    }

    function modificarReserva(idReserva) {
        alert("entro");
        //window.open("frmModificarReserva.aspx?idReserva=" + idReserva);
        //location.href = "frmModificarReserva.aspx?idReserva=" + idReserva;
        //location.href = 'http://www.google.com';
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
  <form id="formularioGestionarEvento" name="formularioGestionarEvento" runat="server" action="" method="POST">
    <table width="100%" border="0" height="100%">
    <tr>
        <td height="99" colspan="5" valign="top"><img src="css/img/Cabecera.png" width="100%" height="117" alt=""/></td>
    </tr>
    <tr>
        <td width="49" valign="top">&nbsp;</td>
        <td colspan="3">
     <table height="100%" border="0" align="center">
      <tr>
        <td colspan="4" align="left" valign="middle" class="txtrojo"><h1><strong><img src="css/img/logoCH.png" width="25" height="20" />Gestionar Reserva</strong></h1></td>
        </tr>
      <tr>
        <td colspan="4" align="left" valign="middle"><span class="strong"><img src="css/img/top-verde.png" width="900" alt="" height="7" /></span></td>
        </tr>
      <tr>
        <td align="left" valign="middle" class="strong">&nbsp;</td>
        <td width="231" align="left" valign="middle" class="classInput">&nbsp;</td>
        <td width="186" align="left" valign="middle" class="strong">&nbsp;</td>
        <td width="305" align="left" valign="middle">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" valign="middle" class="strong">Tipo de documento:</td>
        <td align="left" valign="middle"><span class="classInput">
          <select name="selectTipoDocumento" id="selectTipoDocumento" runat="server">
            <option value="0" selected="selected">Seleccionar</option>
            <option value="D.N.I.">D.N.I.</option>
            <option value="C.E.">C.E.</option>
            <option value="Pasaporte">Pasaporte</option>
            <option value="Otros">Otros</option>
            <option value="R.U.C.">R.U.C.</option>
          </select>
        </span></td>
        <td align="left" valign="middle" class="strong">Número de documento:</td>
        <td align="left" valign="middle">
            <input type="text" name="txtNumeroDocumento" id="txtNumeroDocumento" runat="server" onchange="validarNroDoc()" onkeypress="if ( isNaN( String.fromCharCode(event.keyCode) )) return false;"/>
        </td>
      </tr>
      <tr>
        <td align="left" valign="middle" class="strong">Tipo de reserva:</td>
        <td align="left" valign="middle"><span class="classInput">
          <select name="selectTipoReserva" id="selectTipoReserva" runat="server">
            <option selected="selected">Evento</option>
          </select>
        </span></td>
        <td align="left" valign="middle" class="strong">&nbsp;</td>
        <td align="left" valign="middle" class="strong">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" valign="middle"><span class="strong">Fecha de realización:</span></td>
        <td align="left" valign="middle">
            <input ID="txtFechaRealizacion" runat="server"></input>
            <img src="css/img/calender.png" alt="calendar"/>
        </td>
        <td align="left" valign="middle">&nbsp;</td>
        <td align="left" valign="middle">&nbsp;</td>
      </tr>
      <tr>
        <td align="left" valign="middle">&nbsp;</td>
        <td align="left" valign="middle">&nbsp;</td>
        <td align="left" valign="middle">&nbsp;</td>
        <td align="left" valign="middle">
            <input name="btnNuevo" type="button" id="btnNuevo" runat="server" value="Nuevo"/>
            <input name="btnBuscar" type="button" id="btnBuscar" value="Buscar" runat="server"/>
        </td>
      </tr>
      <tr>
        <td colspan="4" align="center" valign="middle">&nbsp;</td>
        </tr>
      <tr>
        <td colspan="4" align="left" class="txtrojo">
            <h1><strong><img src="css/img/logoCH.png" alt="" width="25" height="20" />Resultado de Reservas</strong></h1>
        </td>
      </tr>
      <tr>
        <td colspan="4" align="left"><span class="strong"><img src="css/img/top-verde.png" alt="" width="901" height="6" /></span></td>
      </tr>
      
      <!--<c:choose>
       <c:when test="${not empty reservaseventos}">-->
      <tr>
        <td colspan="4" align="left">
        <asp:Table id="tableReservas" runat="server" width="100%" border="1">
        
         <asp:TableRow ID="TableRow1" runat="server">
            <asp:TableCell ID="TableCell1" runat="server" width="21%" bgcolor="#CE8E15">Cliente</asp:TableCell>
            <asp:TableCell ID="TableCell2" runat="server" width="9%" bgcolor="#CE8E15">Tipo documento</asp:TableCell>
            <asp:TableCell ID="TableCell3" runat="server" width="12%" bgcolor="#CE8E15">Nómero documento</asp:TableCell>
            <asp:TableCell ID="TableCell4" runat="server" width="11%" bgcolor="#CE8E15">Tipo Reserva</asp:TableCell>
            <asp:TableCell ID="TableCell5" runat="server" width="10%" bgcolor="#CE8E15">Tipo Evento</asp:TableCell>
            <asp:TableCell ID="TableCell6" runat="server" width="12%" bgcolor="#CE8E15">Fecha Registro</asp:TableCell>
            <asp:TableCell ID="TableCell7" runat="server" width="12%" bgcolor="#CE8E15">Fecha Realización</asp:TableCell>
            <asp:TableCell ID="TableCell8" runat="server" width="9%" bgcolor="#CE8E15">Estado</asp:TableCell>
            <asp:TableCell ID="TableCell9" runat="server" width="8%" align="center" bgcolor="#CE8E15"><strong>Editar</strong></asp:TableCell>

      </asp:TableRow>
          
        </asp:Table>
        </td>
        </tr>
      
      <tr>
        <td align="left" class="strong">&nbsp;</td>
        <td align="left">&nbsp;</td>
        <td align="left">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>
      <tr>
        <td colspan="4" align="center" class="strong">
        <input name="btnRegresar" type="submit" id="btnRegresar" value="Regresar" runat="server"/></td>
      </tr>
    </table>
        </td>
        <td width="19">&nbsp;</td>
    </tr>
    </table>

  </form>
</body>
</html>
